#! /usr/bin/python


def fibonacci(num):	
  
  print "fibonacci(" + (str(num)) +")"
  sequence_list = []
  sequence_list.append(0)
  sequence_list.append(1)
  number1 = 0
  number2 = 1
  number3 = 0 
  #print number1
  #print number2     
  while num >= number3:	
     number3= number1 + number2 
     if num >= number3:
	#print number3
        sequence_list.append(number3)
     else:
        print sequence_list
        return
     number1= number2
     number2= number3	

def nthfibonacci_sequence(num):
  number1 = 0
  number2 = 1
  number3 = 0   
  print number1
  print number2   
  for i in range(num -2):     
    number3= number1 + number2 
    print number3
    number1= number2
    number2= number3	


def main():
  fibonacci(4)
  fibonacci(13)
  nthfibonacci_sequence(20)
 

if __name__ == '__main__':
  main()
